package com.lu.statistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lu.statistics.entity.SysAppMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysAppMenuMapper extends BaseMapper<SysAppMenu> {
    /**
     * 查询菜单列表(分页)
     * @param page
     * @param title
     * @return
     */
    List<SysAppMenu> queryParentMenu(Page<SysAppMenu> page, @Param("title") String title);

    /**
     * 查询子级菜单(角色授权)
     * @param status
     * @param title
     * @return
     */
    List<SysAppMenu> queryListByCondition(@Param("status") Integer status, @Param("title") String title);

    /**
     * 按菜单编码和名称统计菜单数量
     * @param code
     * @param title
     * @return
     */
    int queryMenuCount(@Param("code") String code,@Param("title") String title);
}
